package com.qining618.cms.ucenter.mapper;

import com.qining618.cms.ucenter.domain.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 角色 Mapper 接口
 * </p>
 *
 * @author qining
 * @date 2019-09-16
 */
@Mapper
@Repository
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * 角色id是否存在
     * @param id 角色id
     * @return boolean
     */
    @Select("select count(1) from o_role where id = #{id}")
    boolean existById(Long id);

}
